package com.ziilion;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;


public class logInPage extends Activity {
	private EditText iD;
    private EditText password;
    private Button btnSignIn;
    private Button btnSignUp;
    private Button btnTakeALook;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
        setContentView(R.layout.log_in_page);
        iD=(EditText)this.findViewById(R.id.id);
        password=(EditText)this.findViewById(R.id.password);
        btnSignIn=(Button)this.findViewById(R.id.signin);
        btnSignUp=(Button)this.findViewById(R.id.signup);
        btnTakeALook=(Button)this.findViewById(R.id.takealook);
        btnSignIn.setOnClickListener((OnClickListener) new SignInListener());
        btnSignUp.setOnClickListener((OnClickListener) new SignUpListener());
        btnTakeALook.setOnClickListener((OnClickListener) new TakeALookListener());

	}
	class  SignInListener implements OnClickListener{

		  @Override
		  public void onClick(View v) {
		   // TODO Auto-generated method stub
		   String ID=iD.getText().toString();
		   String Password=password.getText().toString();
		   Intent intent=new Intent();
		   
		   intent.setClass(logInPage.this,AppMain.class);
		   logInPage.this.startActivity(intent);
		  }
	}
	class  SignUpListener implements OnClickListener{

		  @Override
		  public void onClick(View v) {
		   // TODO Auto-generated method stub
		   
		   Intent intent=new Intent();
		   
		   intent.setClass(logInPage.this,SignUpPage.class);
		   logInPage.this.startActivity(intent);
		  }
	}
	class  TakeALookListener implements OnClickListener{

		  @Override
		  public void onClick(View v) {
		   // TODO Auto-generated method stub
		   String ID=iD.getText().toString();
		   String Password=password.getText().toString();
		   Intent intent=new Intent();
		   
		   intent.setClass(logInPage.this,AppMain.class);
		   logInPage.this.startActivity(intent);
		  }
	}
}
